/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Steven
 */
@Entity
@Table(name = "gizmo")
@NamedQueries({
    @NamedQuery(name = "Gizmo.findAll", query = "SELECT g FROM Gizmo g"),
    @NamedQuery(name = "Gizmo.findBySrc", query = "SELECT g FROM Gizmo g WHERE g.src = :src"),
    @NamedQuery(name = "Gizmo.findByColors", query = "SELECT g FROM Gizmo g WHERE g.colors = :colors")})
public class Gizmo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "src")
    private String src;
    @Basic(optional = false)
    @Column(name = "colors")
    private String colors;

    public Gizmo() {
    }

    public Gizmo(String src) {
        this.src = src;
    }

    public Gizmo(String src, String colors) {
        this.src = src;
        this.colors = colors;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public String getColors() {
        return colors;
    }

    public void setColors(String colors) {
        this.colors = colors;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (src != null ? src.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Gizmo)) {
            return false;
        }
        Gizmo other = (Gizmo) object;
        if ((this.src == null && other.src != null) || (this.src != null && !this.src.equals(other.src))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vo.Gizmo[src=" + src + "]";
    }

}
